import 'package:factoryside/bean/factory_address_entity.dart';

factoryAddressEntityFromJson(FactoryAddressEntity data, Map<String, dynamic> json) {
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['value'] != null) {
		data.value = json['value'] is String
				? int.tryParse(json['value'])
				: json['value'].toInt();
	}
	return data;
}

Map<String, dynamic> factoryAddressEntityToJson(FactoryAddressEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['name'] = entity.name;
	data['value'] = entity.value;
	return data;
}